package cn.zhentao.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单信息表
 * </p>
 *
 * @author mp
 * @since 2025-06-16
 */
@Data
@ToString
public class Orders implements Serializable{

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String orderNumber;

    private Integer userId;

    private Integer addressId;

//    @JsonFormat(pattern = "YYYY-MM-DD hh:mm:ss",timezone = "GMT-8")
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private String  deliveryTime;
    /**
     * 0-待分配 1-已分配 2-配送中 3-已完成 4-已取消
     */
    @TableField("`status`")
    private Integer status;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createdAt;

    private String mudidi3;
    private String notes;
    private String zhongdian;
    private String jiage;
    @TableField(exist = false)
    private String deliveryname;
    @TableField(exist = false)
    private String uname;
    @TableField(exist = false)
    private String dname;
    private Integer isCollected;

    public void setDeliveryname(String deliveryname) {
        this.deliveryname = deliveryname;
    }

}
